<?php if(!defined('IN_PISCES')){exit('Access Denied.');}?>
{if !empty($this->data['adList']) && !empty($this->data['adList'][12])}
<!--{loop $this->data['adList'][12] $mk $item}-->
<div class="ad-all mb5">
{$item['code']}
</div>
<!--{/loop}-->
{/if}
<div id="yui-main">
	<div class="yui-b ppl">
		<div class="tab">
		<ul>
		<li class="selected"><a href="{url('Post','List')}"><span>所有帖子</span></a></li>
		<li><a href="{url('Post','Edit')}"><span>发表帖子</span></a></li>
		<li><a href="{url('Post','Product')}"><span>分享商品</span></a></li>
		</ul>
		</div>
		<div class="postsbox">
			<table cellspacing="0" cellpadding="0" class="tbl-posts">
			<tbody>
			<tr>
			<td colspan="4" class="tag">
			<a href="{url('Post','List')}">全部分类</a>
			{TagList(array(),'id ASC',0,20,'id,name')}
			{if !empty($pvTagList['rows'])}
			<!--{loop $pvTagList['rows'] $item}-->
			{if $this->data['tag_id']==$item['id']}<span class="select">{$item['name']}</span>{else}<a href="{url('Post','List',array('tag'=>$item['id']))}">{$item['name']}</a>{/if}
			<!--{/loop}-->
			{/if}
			</td>
			</tr>
			<tr>
				<th class="subject">标题</th>
			    <th class="later">发表</th>
				<th class="score">阅读</th>
				<th class="last">最后回复</th>
			</tr>
			{if !empty($this->data['postList'])}
			<!--{loop $this->data['postList'] $mk $item}-->
			<tr{if (($mk % 2) == 1)} class="odd"{/if}>
			<td class="subject">
			<div class="detail">
			{if $item['visit_num']>20}<span class="status"><img alt="热门帖" src="{$this->data['baseurl']}images/post_hot.png"></span>{/if}
			<a target="_blank" href="{url('Post','View',array('id'=>$item['id']))}">{$item['title']}</a>
			</div>
			</td>
			<td class="later">
			<div class="info comet-xs">
			<h4>{$item['username']}</h4>
			<div class="time">{$this->data['cf']->getBeforeTime($item['created'])}</div>
			</div>
			</td>
			<td class="score">
			{$item['visit_num']}
			</td>
			<td class="last">
			<div class="info comet-xs">
			<div class="name">{$item['last_post']}</div>
			</div>
			</td>
			</tr>
			<!--{/loop}-->
			{/if}
			</tbody>
			</table>
			<div class="pager mt10">{$this->data['pages']}</div>
		</div>
	</div>
</div>
<div class="yui-b">
	{if !empty($this->data['adList']) && !empty($this->data['adList'][17])}
	<!--{loop $this->data['adList'][17] $mk $item}-->
	<div class="index-right-ad mb5 ml10">
	{$item['code']}
	</div>
	<!--{/loop}-->
	{/if}
		<script language="javascript">
function checkSearch()
{
	if($('#searchKey').val()=='')
	{
		alert('请输入要搜索的关键词！');
		return false;
	}
	return true;
}
</script>
<div id="left" class="col210 ml10 mt10">
<div class="indexinfo">
	{if $this->data['user']}
	<div class="userbox">
		<div class="userlogo">
		<img src="{$this->data[user]['logo']}" width="60" height="60" />
		</div>
		<div class="userinfo">
			<ul>
			<li>欢迎您，<a href="{url('User','Index')}">{$this->data['user']['username']}</a></li>
			{if $this->data['return']['rate']>0}<li>账户余额：<a href="{url('Return','Index')}">{$this->data['user']['money']}</a></li>
			<li><a href="{url('Return','Edit')}">申请提现</a> <a href="{url('Return','Index')}">我的返现</a></li>
			{else}
			<li><a href="{url('Post','Edit')}">发表帖子</a> <a href="{url('Post','Product')}">分享商品</a></li>
			{/if}
			</ul>
		</div>
	</div>
	<div class="loginbox"><button class="login_btn" onclick="document.location='{url('User','Logout')}'">退出登录</button></div>
	{else}
	<div class="loginbox"><button class="login_btn" onclick="document.location='{$this->data['loginUrl']}'">会员登录</button></div>
	{/if}
</div>
<div class="line"></div>
<div class="indexinfo find">
	<h2>找找看</h2>
	<ul>
		<form method="post" action="{url('Default','List')}">
			<input type="text" name="k" class="searchKey" id="searchKey" autocomplete="off" /><input type="submit" class="login_btn" value="用输入的关键词找找看" onclick="return checkSearch();"/>
		</form>
	</ul>
</div></div>
	{component frontend right}
	{if !empty($this->data['adList']) && !empty($this->data['adList'][18])}
	<!--{loop $this->data['adList'][18] $mk $item}-->
	<div class="index-right-ad mt5 ml10">
	{$item['code']}
	</div>
	<!--{/loop}-->
	{/if}
</div>
{if !empty($this->data['adList']) && !empty($this->data['adList'][13])}
<div class="clear"></div>
<!--{loop $this->data['adList'][13] $mk $item}-->
<div class="ad-all mt5">
{$item['code']}
</div>
<!--{/loop}-->
{/if}
<script language="javascript">
replaceImage();
</script>
